<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/12/4
 * Time: 15:44
 */


/* 商品数据模型 */

class Store_detailModel extends BaseModel {

    var $table = 'store_detail';
    var $_name = 'store_detail';

    /* 取得商品库存数 */

    function get_count($sku) {
        $sql = "SELECT sum(Num) FROM {$this->table} WHERE Spu = '{$sku}'";
        return $this->db->getOne($sql);
    }

}